Skip to main content

Dynamic widget language configuration

Supported languages:

  • Spanish (Default)
  • English
  • Portuguese

Does your website have a language selector? Then you can use this function to make the widget's language configuration dynamic.

  • Class: "ocularWidget"
  • Method: setLocale
  • Parameter: String
Function to integrate:
ocularWidget.setLocale('pt')

Valid parameters the function can receive:

  • 'es' -> Spanish
  • 'en' -> English
  • 'pt' -> Portuguese

By default the widget is always displayed in Spanish; if you have set another language it will be displayed according to the configured option, and if you have installed the class above in your language selector, the widget will automatically respond to the selected option.